package com.itheima.day24;

import java.util.TreeMap;

public class TreeMapDemo01 {
    public static void main(String[] args) {

        TreeMap<Student,String> tm=new TreeMap<>();

        // 创建学生对象
        Student s1 = new Student("xiaohei",24);
        Student s2 = new Student("dapang",26);
        Student s3 = new Student("xiaomei",22);

        // 将学生对象添加到TreeMap集合中
        tm.put(s1,"江苏");
        tm.put(s2,"北京");
        tm.put(s3,"天津");

        System.out.println(tm);
    }
}
